﻿/*主页index.html样式表*/


/*顶部导航条的容器*/

.topbar-wrapper {
    width: 100%;
    background-color: #333;
    height: 40px;
    line-height: 40px;
}


/*超链接颜色*/

.topbar a {
    font-size: 12px;
    color: #b0b0b0;
    display: block;
}

.topbar a:hover {
    color: #fff;
}

.topbar .line {
    color: #424242;
    font-size: 12px;
    margin: 0 8px;
    margin-top: -1px;
}


/*左侧导航栏*/

.servers,
.topbar-wrapper li {
    float: left;
}

.user-info,
.shop-cart {
    float: right;
}

.shop-cart {
    margin-left: 25px;
}


/*购物车*/

.shop-cart a {
    width: 120px;
    background-color: #424242;
    text-align: center;
}

.shop-cart i {
    margin-right: 2px;
}

.shop-cart:hover a {
    background-color: #fff;
    color: #ff6700;
}


/*小米商城app*/

.app .qrcode img {
    width: 90px;
    height: 90px;
    margin: 17px;
}

.app .qrcode {
    display: block;
    overflow: hidden;
    width: 124px;
    /*height:148px;*/
    height: 0;
    background-color: white;
    line-height: 1px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    position: absolute;
    left: -40px;
    z-index: 9999;
    /*过渡效果*/
    transition: height 0.2s;
}

.app .qrcode span {
    color: black;
    font-size: 14px;
}

.app {
    position: relative;
}


/*app下的小三角形*/


/*.app-wrapper:hover> .app::after{*/

.app::after {
    /*display: none;*/
    content: '';
    display: none;
    position: absolute;
    /*overflow:hidden;*/
    width: 0px;
    height: 0;
    border: 6px solid transparent;
    border-top: none;
    /*line-height:1px;*/
    border-bottom-color: white;
    left: 0px;
    bottom: 0px;
    right: 0px;
    margin: auto;
}


/*.app-wrapper:hover>.app .qrcode{*/

.app:hover .qrcode,
.app:hover::after {
    display: block;
    height: 148px;
}

.shop-cart {
    position: relative;
}

.shop-cart .shop-box span {
    color: black;
    font-size: 14px;
    text-align: center;
    line-height: 120px;
}


/*购物车下拉框*/

.shop-cart .shop-box {
    display: block;
    overflow: hidden;
    width: 350px;
    /*height:148px;*/
    height: 0px;
    background-color: white;
    line-height: 1px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    position: absolute;
    right: 19px;
    /*过渡效果*/
    transition: height 0.2s;
}

.shop-cart:hover .shop-box {
    height: 120px;
}

.header {
    height: 100px;
}

.header .logo {
    float: left;
    margin-top: 22.5px;
    position: relative;
    width: 55px;
    height: 55px;
    overflow: hidden;
    /* 隐藏文本 */
    text-indent: -999px;
}

.header .logo a {
    width: 55px;
    height: 55px;
    display: block;
    background-color: #ff6700;
    background-image: url("../img/mi.png");
    background-position: center;
    position: absolute;
    left: 0;
    transition: left 0.3s;
}

.header .logo .home {
    left: -55px;
}

.header .logo:hover .mi {
    left: 55px;
}

.header .logo:hover .home {
    left: 0px;
}

.header .logo .home {
    background-image: url("../img/home.png");
}


/* 中间导航条 */

.header .nav-wrapper {
    float: left;
    margin-left: 7px;
}

.header .nav {
    /* width:850px; */
    /* background-color: aqua; */
    height: 100px;
    line-height: 100px;
    /* margin-left: 58px; */
    padding-left: 58px;
}

.nav>li {
    float: left;
}


/* 设置左侧导航条样式 */

.left-menu {
    width: 234px;
    height: 420px;
    padding: 20px 0;
    background-color: rgba(0, 0, 0, 0.6);
    position: absolute;
    z-index: 999;
    left: -120px;
    line-height: 1;
}

ul.left-menu li a {
    display: block;
    height: 42px;
    line-height: 42px;
    color: white;
    margin-right: 0px;
    padding: 0 30px;
    font-size: 14px;
}

ul.left-menu li a:hover {
    color: white;
    background-color: #ff6700;
}

.left-menu a i {
    float: right;
    /* margin-top: 12px; */
    line-height: 42px;
}

.all-goods-wrapper {
    position: relative;
    /* background-color: red; */
}

.nav-wrapper li a {
    font-size: 16px;
    margin-right: 20px;
    /* 转换成块元素,可以撑开内容区,hover */
    display: block;
}

.nav-wrapper li a:hover {
    color: #ff6700;
}

.all-goods {
    visibility: hidden;
}

.nav .goods-info {
    /* height: 228px; */
    height: 0px;
    overflow: hidden;
    width: 100%;
    background-color: white;
    top: 140px;
    left: 0px;
    position: absolute;
    transition: height 0.3s;
    z-index: 9999;
}


/* 选择.nav li后面的所有goods-info
用~ 不能用+ +表示相邻的,结构上.nav li和goods-info不相邻
*/

.nav .show-goods:hover~.goods-info,
.goods-info:hover {
    height: 228px;
    border-top: 1px solid rgb(224, 224, 224);
    box-shadow: 0 4px 2px rgba(0, 0, 0, 0.1);
}


/* 搜索框 */

.search-wrapper {
    width: 296px;
    height: 50px;
    float: right;
    margin-top: 25px;
    /* border:1px solid rgb(224,224,224); */
}

.search-wrapper .search-inp {
    box-sizing: border-box;
    width: 244px;
    float: left;
    height: 50px;
    /* border:none; */
    padding: 0 10px;
    font-size: 16px;
    border: 1px solid rgb(224, 224, 224);
    outline: none;
}

.search-wrapper .search-btn {
    float: left;
    height: 50px;
    width: 52px;
    padding: 0;
    /* border:none; */
    color: #616161;
    background-color: #fff;
    font-size: 16px;
    border: 1px solid rgb(224, 224, 224);
    border-left: none;
}

.search-wrapper .search-inp:focus,
.search-wrapper .search-inp:focus+button {
    border-color: #ff6700;
}

.search-wrapper .search-btn:hover {
    background-color: #ff6700;
    color: white;
    border: none;
}


/* 轮播图 */

.banner {
    position: relative;
    height: 460px;
}

.banner .img-list li {
    position: absolute;
}

.banner img {
    width: 100%;
    vertical-align: top;
}


/* 导航点 */

.pointer {
    position: absolute;
    bottom: 22px;
    right: 35px;
}

.pointer a {
    float: left;
    width: 8px;
    height: 8px;
    background-color: rgba(0, 0, 0, 0.4);
    border: 2px rgba(255, 255, 255, 0.4) solid;
    border-radius: 50%;
    margin-left: 6px;
}

.pointer a:hover,
.pointer a.active {
    background-color: rgba(255, 255, 255, 0.4);
    border-color: rgba(0, 0, 0, 0.4);
}


/* 箭头 */

.prev-next a {
    width: 41px;
    height: 69px;
    background-color: red;
    position: absolute;
    /* line-height: 460px; */
    top: 0;
    bottom: 0;
    margin: auto 0;
    background: url(../img/icon-slides.png);
}

.prev-next .prev {
    left: 234px;
    background-position: -84px 0;
}

.prev-next .next {
    right: 0;
    background-position: -125px 0;
}

.prev-next .prev:hover {
    background-position: 0 0;
}

.prev-next .next:hover {
    background-position: -42px 0;
}


/* 设置回到顶部元素 */

.back-top {
    width: 26px;
    height: 206px;
    background-color: #bfa;
    position: fixed;
    bottom: 150px;
    right: 50%;
    margin-right: -639px;
    /* 布局等式,left + margin-left + width + margin-right + right = 视口的宽度 */
}

.recommend {
    /* background-color: red; */
    height: 170px;
    margin-top: 14px;
}

.recommend .shortcut,
.recommend .recommend-imgs,
.recommend li {
    float: left;
}


/* 左侧快捷方式 */

.recommend .shortcut {
    width: 228px;
    height: 170px;
    background-color: #5f5750;
    margin-right: 14px;
    padding-top: 2px;
    padding-left: 6px;
}

.recommend .shortcut a {
    color: #cfccca;
    display: block;
    height: 84px;
    width: 76px;
    text-align: center;
    font-size: 12px;
    /* line-height: 84px; */
    overflow: hidden;
}

.recommend .shortcut a:hover {
    color: #fff;
}

.recommend .shortcut i {
    display: block;
    margin-top: 20px;
    font-size: 20px;
    margin-bottom: 6px;
}

.recommend .shortcut li {
    position: relative;
}

.recommend .shortcut li::before {
    content: '';
    position: absolute;
    width: 64px;
    height: 1px;
    background-color: #665e57;
    left: 0;
    right: 0;
    top: 0;
    margin: 0 auto;
}

.recommend .shortcut li::after {
    content: '';
    position: absolute;
    width: 1px;
    height: 70px;
    background-color: #665e57;
    left: 0;
    top: 0;
    bottom: 0;
    margin: auto 0;
}


/* 左侧图片 */

.recommend .recommend-imgs li {
    width: 316px;
    margin-right: 15px;
}

.recommend .recommend-imgs li:last-child {
    margin: 0;
}

.recommend .recommend-imgs img {
    width: 100%;
    vertical-align: top;
}